<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
    <title><%= htmlWebpackPlugin.options.title %></title>
    <script>
        (function (baseFontSize, fontscale) {
            var _baseFontSize = baseFontSize || 100;
            var _fontscale = fontscale || 1;
            var win = window;
            var doc = win.document;
            var ua = navigator.userAgent;
            var matches = ua.match(/Android[\S\s]+AppleWebkit\/(\d{3})/i);
            var UCversion = ua.match(/U3\/((\d+|\.){5,})/i);
            var isUCHd = UCversion && parseInt(UCversion[1].split('.').join(''), 10) >= 80;
            var isIos = navigator.appVersion.match(/(iphone|ipad|ipod)/gi);
            var dpr = win.devicePixelRatio || 1;
            if (!isIos && !(matches && matches[1] > 534) && !isUCHd) {
                // 如果非iOS, 非Android4.3以上, 非UC内核, 就不执行高清, dpr设为1;
                dpr = 1;
            }
            var scale = 1 / dpr;

            var metaEl = doc.querySelector('meta[name="viewport"]');
            if (!metaEl) {
                metaEl = doc.createElement('meta');
                metaEl.setAttribute('name', 'viewport');
                doc.head.appendChild(metaEl);
            }
            metaEl.setAttribute('content', 'width=device-width,user-scalable=no,initial-scale=' + scale + ',maximum-scale=' + scale + ',minimum-scale=' + scale);
            doc.documentElement.style.fontSize = _baseFontSize / 2 * dpr * _fontscale + 'px';
            doc.documentElement.setAttribute('data-dpr', dpr);
        })();
    </script>
    <!-- babel-polyfill@6.20.0 -->
    <!-- <script src="https://os.alipayobjects.com/rmsportal/wzWaWInUcXErDyTwvySY.js"></script> -->
    <script>
        if (!window.Intl) {
            document.writeln('<script src="https://as.alipayobjects.com/g/component/intl/1.0.1/Intl.js">' + '<' + '/script>');
            document.writeln('<script src="https://as.alipayobjects.com/g/component/intl/1.0.1/locale-data/jsonp/zh.js">' + '<' + '/script>');
            document.writeln('<script src="https://as.alipayobjects.com/g/component/intl/1.0.1/locale-data/jsonp/en.js">' + '<' + '/script>');
        }
    </script>
</head>
<body>
<div id="root"></div>
<% if (htmlWebpackPlugin.options.shim.fastclick) { %>
    <script type="text/javascript" src="<%= htmlWebpackPlugin.options.shim.fastclick.src %>"></script>
    <script type="text/javascript">
    if ('addEventListener' in document) {
        document.addEventListener('DOMContentLoaded', function() {
            FastClick.attach(document.body);
        }, false);
    }
    </script>
<% } %>
</body>
</html>